﻿using SqlSugar;

namespace FastCode.Models
{
    public class BaseModel
    {
        public BaseModel()
        {

        }

        //数据是自增需要加上IsIdentity 
        //数据库是主键需要加上IsPrimaryKey 
        //注意：要完全和数据库一致2个属性
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        [UIType(EUIType.Text, order: 1, isEditable: false)]
        public int Id { get; set; }

        [UIType(EUIType.Text, "创建时间", isEditable: false)]
        public DateTime CreateTime { get; set; }

        [SugarColumn(IsNullable = true)]
        [UIType(EUIType.Text, "更新时间", isEditable: false)]
        public DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        [UIType(isShow: false, isEditable: false)]
        public bool IsDeleted { get; set; } = false;

    }
}
